par(mfrow=c(1, 2))
data<-read.csv("data/习题数据（基于R，EXCEL格式）/csv/E2_2.csv")

# 设置时间序列变量
co2<-ts(data$co2, frequency = 12, start=1975)
# 绘制时序图
plot(co2, 
     type = "o", pch = 5, col = '#39CBB4', 
     main = "时序图", xlab = "year", ylab = "co2")

# 绘制自相关图
acf(ts(data$co2), lag.max=30)$acf

